var tabpanel;
//单击菜单事件
function clickMenu(url,title){
//	document.getElementById('mainBody').src = url;
		tabpanel.addTab({id:title,title:title, html:'<iframe src="'+url+ '" width="100%" height="100%" frameborder="0"></iframe>',url:url});

}
function showDetail(id,title){
		tabpanel.addTab({id:"memu" + id,title:title, html:'<iframe src="menu-resource!menuValue.action?id='+ id +'" width="100%" height="100%" frameborder="0"></iframe>',url:"menu-resource!menuValue.action?id="+ id});
}
//首页显示时间
function showTime(){
	var t = new Date();
	var years = t.getFullYear();
	var months = t.getMonth() + 1;
	var days = t.getDate();
	var weeks = t.getUTCDay();
	var hours = t.getHours();
	var minutes = t.getMinutes();
	var seconds = t.getSeconds();
	
	if (seconds <= 9)
		seconds = "0" + seconds;
	if (minutes <= 9)
		minutes = "0" + minutes;
	switch (weeks){
		case 0: weeks = "星期日";
		break;
		case 1: weeks = "星期一";
		break;
		case 2: weeks = "星期二";
		break;
		case 3: weeks = "星期三";
		break;
		case 4: weeks = "星期四";
		break;
		case 5: weeks = "星期五";
		break;
		case 6: weeks = "星期六";
		break;
	}
	myclock =  "&nbsp;&nbsp;"+years + "年" + months + "月" + days + "日    "+ weeks +"   "+ hours + ":" + minutes;
	//myclock ="<img src='/images/clock.gif' width='16' height='16' align='absmiddle' /> " + years + "年" + months + "月" + days + "日  "+ weeks;
	document.getElementById("time").innerHTML = myclock;
	setTimeout("showTime()",1000)
}	
function MM_findObj(n, d) { // v4.01
	var p, i, x;
	if (!d)
		d = document;
	if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
		d = parent.frames[n.substring(p + 1)].document;
		n = n.substring(0, p);
	}
	if (!(x = d[n]) && d.all)
		x = d.all[n];
	for (i = 0;!x && i < d.forms.length; i++)
		x = d.forms[i][n];
	for (i = 0;!x && d.layers && i < d.layers.length; i++)
		x = MM_findObj(n, d.layers[i].document);
	if (!x && d.getElementById)
		x = d.getElementById(n);
	return x;
}
function MM_swapImgRestore() { // v3.0
	var i, x, a = document.MM_sr;
	for (i = 0;a && i < a.length && (x = a[i]) && x.oSrc; i++)
		x.src = x.oSrc;
}
function MM_swapImage() { // v3.0
	var i, j = 0, x, a = MM_swapImage.arguments;
	document.MM_sr = new Array;
	for (i = 0;i < (a.length - 2); i += 3)
		if ((x = MM_findObj(a[i])) != null) {
			document.MM_sr[j++] = x;
			if (!x.oSrc)
				x.oSrc = x.src;
			x.src = a[i + 2];
		}
}